package com.efast.dmom.mgmt.controller.mes;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.efast.cafe.framework.bean.ResultBean;
import com.efast.dmom.mgmt.bean.mes.ReportQueryBean;
import com.efast.dmom.mgmt.service.mes.ReportQueryService;

@Controller
@RequestMapping("/report")
public class ReportQueryController {

	@Autowired
	private ReportQueryService ReportQueryService;
	
	// 制造过程质量问题分析报表查询
	@RequestMapping("/productQuality")
	public @ResponseBody ResultBean productQualityQuestion (@RequestBody ReportQueryBean reportQueryBean) {
		ResultBean resultBean = ReportQueryService.productQualityQuestion(reportQueryBean);
		return resultBean;
	}
	// 制造过程质量问题分析 查询所有车型
	@RequestMapping("/selectAllCarType")
	public @ResponseBody ResultBean selectAllCarType () {
		ResultBean resultBean = ReportQueryService.selectAllCarType();
		return resultBean;
	}
	// 制造过程质量问题分析 查询所有工位
	@RequestMapping("/selectAllStation")
	public @ResponseBody ResultBean selectAllStation () {
		ResultBean resultBean = ReportQueryService.selectAllStation();
		return resultBean;
	}
	
	// 制造过程质量问题分析 查询所有vin
	@RequestMapping("/selectAllVin")
	public @ResponseBody ResultBean selectAllVin () {
		ResultBean resultBean = ReportQueryService.selectAllVin();
		return resultBean;
	}
	
	//制造过程质量问题分析查询所有零部件名称
	@RequestMapping("/selectAllPartName")
	public @ResponseBody ResultBean selectAllPartName () {
		ResultBean resultBean = ReportQueryService.selectAllPartName();
		return resultBean;
	}
	
	// IQC质量问题分析报表查询
	@RequestMapping("/qualityQuestion")
	public @ResponseBody ResultBean qualityQuestionSearch (@RequestBody ReportQueryBean reportQueryBean) {
		ResultBean resultBean = ReportQueryService.qualityQuestionSearch(reportQueryBean);
		return resultBean;
	}
	
	// IQC质量问题分析报表车型的下拉框
		@RequestMapping("/qualityQuestionCarType")
		public @ResponseBody ResultBean qualityQuestionCarType () {
			ResultBean resultBean = ReportQueryService.qualityQuestionCar();
			return resultBean;
		}
	
	// 售后质量问题分析报表查询
	@RequestMapping("/saleAfterQuestion")
	public @ResponseBody ResultBean saleAfterQuestion (@RequestBody ReportQueryBean reportQueryBean) {
		ResultBean resultBean = ReportQueryService.saleQuestion(reportQueryBean);
		return resultBean;
	}
	
	// 售后质量问题分析报表车型的下拉框
		@RequestMapping("/saleAfterQuestionCarType")
		public @ResponseBody ResultBean saleAfterQuestionCarType () {
			 ResultBean resultBean = ReportQueryService.saleAfterQuestionCarType();
			return resultBean;
		}
		
		// 售后质量问题分析报表VIN的下拉框
		@RequestMapping("/saleAfterQuestionVIN")
		public @ResponseBody ResultBean saleAfterQuestionVIN () {
			  ResultBean resultBean = ReportQueryService.saleAfterQuestionVIN();
			return resultBean;
				}
		
	
}
